home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc Development Framework / ODFDev / ODF / Examples / Form / Include / SOMPart.xh < prev    next >
Encoding:
Text File  |  1995-11-08  |  4.4 KB  |  188 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: Diogenes:Ling:ODF:Examples:Form:Include:SOMPart.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. #ifndef SOM_Module_ODFExamples_defined
  11. #define SOM_Module_ODFExamples_defined 1
  12. #include <som.xh>
  13.  
  14. /*
  15.  * Start of user-defined types:
  16.  */
  17. class SOMClass;
  18. class SOMObject;
  19. class ODFrame;
  20. class ODFacet;
  21. class ODObject;
  22. class ODExtension;
  23. class ODRefCntObject;
  24. class ODPersistentObject;
  25. class ODStorageUnit;
  26. class ODPart;
  27. class ODCanvas;
  28. class ODDragItemIterator;
  29. class ODEmbeddedFramesIterator;
  30. class ODLink;
  31. class ODLinkSource;
  32. class ODObjectSpec;
  33. class ODShape;
  34. class ODStorageUnitView;
  35. class ODTypeList;
  36. class ODTransform;
  37. class ODSession;
  38.  
  39. /*
  40.  * End of user-defined types.
  41.  */
  42. #endif /* SOM_Module_ODFExamples_defined */
  43.  
  44. #ifndef SOM_ODFExamples_ODFForm_xh
  45. #define SOM_ODFExamples_ODFForm_xh
  46.  
  47. class ODFExamples_ODFForm;
  48.  
  49. #define ODFExamples_ODFForm_MajorVersion 0
  50. #define ODFExamples_ODFForm_MinorVersion 0
  51.  
  52. /*
  53.  * Passthru lines: File: "C.xh", "before"
  54.  */
  55. #if FW_LIB_EXPORT_PRAGMAS
  56. #pragma lib_export on
  57. #endif
  58. class FW_CPart;
  59. #if FW_LIB_EXPORT_PRAGMAS
  60. #pragma lib_export off
  61. #endif
  62.  
  63. /* C++ SOM defs */
  64. #include <somcls.xh>
  65. #include <somcm.xh>
  66.  
  67. /* C++ parent defs */
  68. #ifndef SOM_ODPart_xh
  69. #include <Part.xh>
  70. #endif
  71.  
  72. #ifndef ODFExamples_ODFForm_API
  73. #define ODFExamples_ODFForm_API
  74. /*
  75.  * -- The Class API
  76.  */
  77.  
  78. /*
  79.  * Start of user-defined types:
  80.  */
  81.  
  82. /*
  83.  * End of user-defined types.
  84.  */
  85.  
  86. #ifdef OLDIBMSOMAPISUPPORT
  87. #define ODFExamples_ODFFormCClassData ODFExamples_ODFFormClassData
  88. #define ODFExamples_ODFFormNewClass(major,minor) somNewVersionedClassReference(ODFExamples_ODFForm,major,minor)
  89. #endif
  90.  
  91. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  92. #define ODFExamples_ODFFormMetaClass SOMClass
  93.  
  94.  
  95. /* The API to the ODFExamples_ODFForm class object, and the methods it introduces. */
  96. SOMEXTERN struct ODFExamples_ODFFormClassDataStructure {
  97. #ifdef OLDIBMSOMAPISUPPORT
  98.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  99. #else
  100.     long zero;
  101. #endif
  102.     somStaticClassInfo *sci;
  103.     somDToken        instanceDataToken;
  104.     long reserved [3];
  105.     somMToken GetFrameworkPart;
  106.     somMToken NewFrameworkPart;
  107.     somMToken majorversion;
  108. } SOMDLINK ODFExamples_ODFFormClassData;
  109.  
  110. #if !defined(ODFExamples_ODFForm_Class_Source) && !defined(SOM_Module_sompart_Source)
  111. #if PRAGMA_IMPORT_SUPPORTED
  112. #pragma import list ODFExamples_ODFFormClassData
  113. #endif
  114. #endif
  115.  
  116.  
  117. /*
  118.  * -- Typedefs and inline method declarations for left path inherited methods
  119.  * -- are omitted because this compilation had -museinheritedmethods in effect
  120.  */
  121.  
  122.  
  123. /*
  124.  * -- Typedefs for ODFExamples_ODFForm Method Procedures
  125.  */
  126. SOMEXTERN {
  127. typedef FW_CPart*   (* SOMLINK somTD_ODFExamples_ODFForm_GetFrameworkPart)(ODFExamples_ODFForm *somSelf, Environment *ev);
  128. typedef FW_CPart*   (* SOMLINK somTD_ODFExamples_ODFForm_NewFrameworkPart)(ODFExamples_ODFForm *somSelf, Environment *ev,
  129.         ODPart* partWrapper);
  130. }
  131.  
  132. #endif /* ODFExamples_ODFForm_API */
  133.  
  134.  
  135. /*
  136.  * -- This emitter treats Method Tokens as Thunks by default.
  137.  * -- Use the sc modifier "nothunks" to change this default
  138.  */
  139. #undef somresolve_
  140. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  141.  
  142. /*
  143.  * -- The C++ Wrapper Class for ODFExamples_ODFForm
  144.  */
  145. class ODFExamples_ODFForm : public ODPart
  146. {
  147. public:
  148.  
  149. // ODFExamples_ODFForm::new registers use of the class object, and then uses somNew
  150. // to allocate memory and load the object method table pointer. 
  151. void *operator new(size_t size)
  152. {
  153.     SOM_IgnoreWarning(size);
  154.     // Allocate memory using the default allocator for ODFExamples_ODFForm, and
  155.     // clear mem & set method table pointer, call basic initialization
  156.     return (void*) somNewObject(ODFExamples_ODFForm);
  157. }
  158.  
  159. // ODFExamples_ODFForm::delete uses the default deallocator for the object's class.
  160. void operator delete(void * obj)
  161. {
  162.     if (obj) {
  163.         SOM_Resolve(obj,SOMObject,somFree)
  164.            ( (SOMObject*) obj );
  165.     }
  166. }
  167.  
  168. /* method: GetFrameworkPart */
  169. FW_CPart*   GetFrameworkPart(Environment *ev)
  170. {
  171.    return SOM_ResolveD(this,ODFExamples_ODFForm,ODFExamples_ODFForm,GetFrameworkPart)
  172.     (this,ev);
  173. }
  174.  
  175. /* method: NewFrameworkPart */
  176. FW_CPart*   NewFrameworkPart(Environment *ev,
  177.         ODPart* partWrapper)
  178. {
  179.    return SOM_ResolveD(this,ODFExamples_ODFForm,ODFExamples_ODFForm,NewFrameworkPart)
  180.     (this,ev,partWrapper);
  181. }
  182.  
  183. };   /* ODFExamples_ODFForm */
  184.  
  185.  
  186.  
  187. #endif       /* SOM_ODFExamples_ODFForm_xh */
  188.